<h2>tree.js</h2>
<p>Converts &lt;ul&gt; into interactive tree.</p>
<hr/>

<h3>Objects</h3>
<ul>
	<li><a href="#tree">OAT.Tree(optionsObject)</a></li>
</ul>

<h3>Methods</h3>
<ul>
	<li><a href="#assign">OAT.Tree::assign(listElement, collapse)</a></li>
</ul>


<hr/>

<h3><a name="tree">OAT.Tree(optionsObject)</a></h3>
<p><em>optionsObject</em> may contain any of the following:</p>
<ul>
	<li>imagePath - path where all used images live</li>
	<li>imagePrefix - prefix to all images</li>
	<li>ext - image name extension</li>
	<li>onlyOneOpened - boolean, specifying whether only one branch can be opened at a time</li>
	<li>allowDrag - boolean; can user re-drag Tree nodes?</li>
	<li>useDots - boolean; draw dotted connectors?</li>
	<li>onClick - "select|toggle|false"; what to do when user clicks label/icon</li>
	<li>onDblClick - "select|toggle|false"; what to do when user double-clicks label/icon</li>
	<li>poorMode - boolean; switch to "memory_saving_increased_performance / lower_visual_features" mode?</li>
	<li>checkboxMode - boolean; use checkbox mode?</li>
	<li>allowDrag - boolean; can user re-drag Tree nodes?</li>
	<li>defaultCheck - boolean (only in checkbox mode) ; are checkboxes checked by default ?</li>
	<li>checkNOI - boolean (only in checkbox mode); if <code>true</code>, then checked nodes are contained in <code>OAT.Tree::checkedNOI</code>. 
	Otherwise, this array contains unchecked nodes.</li>
	<li>checkCallback - function (only in checkbox mode); will be executed (with <code>nodeSet</code> argument) when user changes state of a checkbox.</li>
</ul>

<h3><a name="assign">OAT::Tree::assign(listElement, collapse)</a></h3>
<p>This converts a list into an interactive tree. <em>listElement</em> specifies an &lt;ul&gt; element in which your list lives. 
Argument <em>collapse</em> toggles initial collapsing of whole tree.</p>
<p>Tree data structure can be accessed and modified. See following simple examples for usage:</p>

<p class="code">
var t1 = new OAT.Tree({imagePath:"images",imagePrefix:"",ext:"gif"}); // will take images from <em>images/Tree_*.gif</em><br/>
var t2 = new OAT.Tree({imagePath:"images",imagePrefix:"prefix",ext:"png"}); // will take images from <em>images/Tree_prefix_*.png</em><br/>
t1.assign("myUL1", true); // collapsed<br/> 
t2.assign("myUL2", false); // expanded<br/>
<br/>
var node1 = t1.tree.children[0];<br/>
var node2 = t2.tree.children[1];<br/>
<br/>
node2.appendChild(node1);<br/>
node1.setLabel("newLabel");<br/>
node2.expand();<br/>
node1.createChild("newLabel", true); // second argument means that new child is a node rather than leaf<br/>
node2.deleteChild(node1);
</p>
